<template>
  <div class="home">
    <MeiRenderEngine :schema="schema" />
  </div>
</template>

<script lang="ts">
import Vue from "vue";
import HelloWorld from "@/components/HelloWorld.vue";
import MeiRenderEngine from "@/components/RenderEngine/index.vue"; // @ is an alias to /src

export default Vue.extend({
  name: "HomeView",
  components: {
    MeiRenderEngine,
  },
  data: function () {
    return {
      schema: {
        cmpName: "Form",
        subSchemas: [
          {
            cmpName: "FormInput",
            label: "姓名",
            name: "name",
          },
          {
            cmpName: "FormInput",
            label: "年龄",
            name: "age",
          },
          {
            cmpName: "FormSelect",
            label: "性别",
            name: "sex",
            options: [
              {
                label: "男",
                value: "male",
              },
              {
                label: "女",
                value: "female",
              },
            ],
          },
        ],
      },
    };
  },
});
</script>
